package com.xiong.springsecurity.exceptions;

import com.xiong.springsecurity.domain.ResponseResult;
import com.xiong.springsecurity.domain.User;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.Map;

/**
 * <p>
 *
 * @author XiongDa
 * @version 1.0.0
 * @belongsProject: SpringSecurity
 * @belongsPackage: com.xiong.springsecurity.exceptions
 * @since 2023/6/15 17:07
 **/
@RestControllerAdvice
public class GlobalExceptionHandler {

//    @ExceptionHandler(Exception.class)
    public ResponseResult<Object> login(Exception e){
        return new ResponseResult<Object>(200, e.getMessage(), null);
    }

}
